import Vue from 'vue'
import Router from 'vue-router'

import Login from '@/pages/Login/Login'
import Register from '@/pages/Register/Register'

import Home from '@/pages/Home/Home'
import HomeWating from '@/pages/Home/HomeWating'

import QuestClass from '@/pages/Quest/QuestClass'
import QuestList from '@/pages/Quest/QuestList'
import QuestAddForm from '@/pages/Quest/QuestAddForm'
import QuestDetail from '@/pages/Quest/QuestDetail'

import TestClass from '@/pages/Test/TestClass'
import TestList from '@/pages/Test/TestList'
import TestAddForm from '@/pages/Test/TestAddForm'

import PreExamName from '@/pages/Exam/PreExamName'
import ExamList from '@/pages/Exam/ExamList'
import ExamAddForm from '@/pages/Exam/ExamAddForm'
import Examing from '@/pages/Exam/Examing'

import PracticeList from '@/pages/Practice/PracticeList'
// import PracticeAddForm from '@/pages/Practice/PracticeAddForm'

import MyExamList from '@/pages/My/MyExamList'
import MyInfo from '@/pages/My/MyInfo'
import MyResetPsw from '@/pages/My/MyResetPsw'

import Labellist from '@/pages/Quest/Labellist'
import DepManage from '@/pages/Manage/DepManage'
import UserManage from '@/pages/Manage/UserManage'
import userTagList from '@/pages/Manage/userTagList'
import userVisitor from '@/pages/My/visitor'
import userContract from '@/pages/My/contract'
Vue.use(Router)

export default new Router({
  routes: [
    {
      path: '/',
      name: 'Login',
      component: Login
    },
    {
      path: '/register',
      name: 'Register',
      component: Register
    },
    {
      path: '/home',
      component: Home,
      children: [
        {
          path: '/',
          component: HomeWating,
          name: '安全履职能力评测系统'
        },
      	{
      		path: 'labellist',
      		component: Labellist,
          name: '标签列表'
      	},
      	{
      		path: 'depManage',
      		component: DepManage,
          name: '部门管理'
      	},
      	{
      		path: 'userManage',
      		component: UserManage,
          name: '用户管理'
      	},
        {
          path: 'questClass',
          component: QuestClass,
          name: '题目分类'
        },
        {
          path: 'questList',
          component: QuestList,
          name: '题目列表'
        },
        {
          path: 'questAddForm',
          component: QuestAddForm,
          name: '新增题目'
        },
        {
          path: 'questAddForm/:id',
          component: QuestAddForm,
          name: '修改题目'
        },
        {
          path: 'questDetail/:id',
          component: QuestDetail,
          name: '题目详情'
        },
        {
          path: 'testClass',
          component: TestClass,
          name: '试卷分类'
        },
        {
          path: 'testList',
          component: TestList,
          name: '试卷列表'
        },
        {
          path: 'testAddForm',
          component: TestAddForm,
          name: '新增试卷'
        },
        {
          path: 'testAddForm/:id',
          component: TestAddForm,
          name: '修改试卷'
        },
        {
          path: 'preExamName',
          component: PreExamName,
          name: '考试预设名'
        },
        {
          path: 'examList',
          component: ExamList,
          name: '考试列表'
        },
        {
          path: 'examAddForm',
          component: ExamAddForm,
          name: '考试'
        },
        {
          path: 'practiceList',
          component: PracticeList,
          name: '练习列表'
        },
        {
          path: 'practiceAddForm',
          component: ExamAddForm,
          name: '练习'
        },
        {
          path: 'myExamList',
          component: MyExamList,
          name: '我的考试'
        },
        {
          path: 'myPracticeList',
          component: MyExamList,
          name: '我的练习'
        },
        {
          path: 'myInfo',
          component: MyInfo,
          name: '个人信息'
        },
        {
          path: 'myResetPsw',
          component: MyResetPsw,
          name: '更改密码'
        },
				{
					path:'userTagList',
					component:userTagList
				},
				{
					path:'userVisitor',
					component:userVisitor
				},
				{
					path:'userContract',
					component:userContract
				}
      ]
    },
    {
      path: '/examing/:id',
      component: Examing
    },
    {
      path: '/examing/check/:id',
      component: Examing,
      name: '查看试卷'
    },
    {
      path: '/examing/checkError/:id',
      component: Examing,
      name: '查看错题'
    }
  ]
})
